<template>
  <div>
    <Topnav @click="$router.push('./proindex')" title="我的收藏" />
    <Postitem
      v-for="postdata in postdatalist"
      :postdata="postdata"
      :key="postdata.id"
    />
  </div>
</template>

<script>
import Topnav from "../../components/Topnav";
import Postitem from "../../components/Postitem";
export default {
  components: {
    Topnav,
    Postitem
  },
  data() {
    return {
      postdatalist: [],
    };
  },
  created() {
    this.$axios({
      url: "/user_star",
    }).then((res) => {
      console.log(res.data.data);
      this.postdatalist = res.data.data;
    });
  },
  methods: {
    loadpage() {
      this.$axios({
        url: "/post/",
      }).then((res) => {
        console.log(res.data);
      });
    },
  },
};
</script>

<style lang="less" scoped>
</style>